﻿import { Component } from '@angular/core';
@Component({
    selector: 'my-app',
    template: `
    <h1>{{title}}</h1>
    <!--<my-heroes></my-heroes>-->
    <nav>
        <a routerLink="/dashboard" routerLinkActive="active">Dashboard</a>
        <!--那个router被激活就使用active类-->
        <a routerLink="/heroes" routerLinkActive="active">Heroes</a>
    </nav>
    <router-outlet></router-outlet>
`,
    //For this reason and to distinguish it from
    //other kinds of components,we call this type
    // of component a Router Component.
    styleUrls: ['app/app.component.css']
})
export class AppComponent {
    title = 'Tour of Heroes';
}